ITEP-84336: Fix incorrect camera pose for models generated with VGGT#1139
Open
daddo-intel wants to merge 32 commits intomainfrom
Open
ITEP-84336: Fix incorrect camera pose for models generated with VGGT#1139daddo-intel wants to merge 32 commits intomainfrom
daddo-intel wants to merge 32 commits intomainfrom
Conversation
|
|
||
| def wait_for_result(api_url: str, request_id: str, verify_ssl: bool, timeout_s: int = 600, poll_s: float = 2.0): | ||
| def wait_for_result(api_url: str, request_id: str, verify_ssl: bool, | ||
| timeout_s: int = 15 * 60, poll_s: float = 1.5): |
Contributor
There was a problem hiding this comment.
Maybe instead calculating 15 * 60 we can just set it to 900?
| files.append(("camera_ids", (None, camera_id))) | ||
| cam_loc = camera_loc_by_id.get(camera_id) | ||
| if cam_loc is not None: | ||
| cam_loc = camera_loc_by_id.get(camera_id) |
Contributor
There was a problem hiding this comment.
redundant if statement
|
|
||
| for camera in cameras: | ||
| cam_id = camera.sensor_id | ||
| camera_order.append(cam_id) |
Contributor
There was a problem hiding this comment.
camera_order.append(camera.sensor_id)
| cam_loc = None | ||
| if camera_locations and idx < len(camera_locations): | ||
| try: | ||
| cam_loc = json.loads(camera_locations[idx]) |
Contributor
There was a problem hiding this comment.
maybe we should log that camera_locations[idx] is not a valid json. Because on runtime we wouldn't know if something was provided but invalid or just empty and everything is fine
| # Median is robust to occasional bad pose entries | ||
| return float(np.median(distances)) | ||
|
|
||
| except Exception: |
Contributor
There was a problem hiding this comment.
should we log at least what exception occurred?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
VGGT outputs camera poses and depth in scale-ambiguous units, which cased:
This PR implements automatic metric scale for VGGT using known camera poses provided to` _processOutputs() and applies scale factor to:
Camera translationsworld_points_from_depthworld_points✨ Type of Change
Select the type of change your PR introduces:
🧪 Testing Scenarios
Describe how the changes were tested and how reviewers can test them too:
✅ Checklist
Before submitting the PR, ensure the following: